{block admin_content}
<h1>Projekty</h1>
<table width="100%">
	<thead>
		<tr><th>Název</th><th>Popis</th><th>Deadline</th><th width="20">Veřejný</th><th width="20"><a n:href="addProject">Přidat</a></th></tr>
	</thead>
	<tbody>
		{foreach $projects as $project}
		<tr>
			<td>{$project[name]}</td>
			<td>{$project[description]|truncate:200}</td>
			<td>{$project[deadline]|date:$dateFormatLong}</td>
			<td class="center">{$project['public']|bool2image}</td>
			<td class="center"><a n:href="editProject, $project[id]"><img src="{$basePath}/images/edit.gif"></a> <a n:href="deleteProject!, $project[id]" onclick="return del();"><img src="{$basePath}/images/delete.gif"></a></td>
		</tr>
		{/foreach}
	</tbody>
</table>
<script type="text/javascript">
function del(){
	return confirm('Opravdu chcete smazat projekt?\nBude smazán včetně všech milníků a souborů.');
}
</script>
{/block}